<?php $this->load->helper('HTML');
echo link_tag('css/style2.css');
echo link_tag('images/favicon.ico','shortcut icon','image/x-icon');
?>

<div id="page1">
<div id="wrapper">
	<?php $this->load->view('admin_views/header'); ?><hr />
</div>

	<div id="page">
	<div id="page-bgtop">
		<div id="content">
        <div class="post">  <h2 class="title">kepala cabang</h2>
           <form method="post" action="<?php echo base_url(); ?>kc/index">
	<table width="590" cellpadding="5" align="center">
<tr>
  <td width="246">Masukkan Nama Kepala Cabang</td>
  <td width="316"><input type="text" name="nama" size="50" autocomplete="off" /></td></tr>
	
	</table>
	</form>
     <?php
	$banyak = count($nama_kc->result_array()); ?>
	   <tr><td>Ditemukan <b><?php echo $banyak?></b> hasil pencarian dengan kata <b><?php echo $nama?> </b></td></tr>
		  <table width="90%" border="0" cellpadding="1" cellspacing="1" id="data" align="center">
    
    <thead>
        <tr  align="center"  class="table">
           <th >No</th>
            <th >Nama Kepala Cabang</th>
            <th >Cabang</th>
            <th >Wilayah</th>
        </tr>
    </thead>
    <tbody>
	
    <!-- ============isi ============ -->
		
		<?php 
			$i=1;
			//foreach($cabang as $m) : 
			if(count($nama_kc->result_array())>0)
	    {
	        foreach($nama_kc->result_array() as $nd)
	        {
		?>
        
      	<tr class='data' align='center'>
			<td ><?php echo $i++; ?></td>
			<td align='left'>&nbsp;<?php echo $nd['strkepala_cabang']; ?></td>
			<td align='left'>&nbsp;<?php echo $nd['strnama_cabang']; ?></td>
            <td align='left'>&nbsp;<?php echo $nd['strwilayah']; ?></td>
        </tr>
		<?php 
		}
	    }
	    else
	    {
	        echo '<tr><td>Tidak ditemukan Kepala cabang dengan nama <b>"'.$nama.'"</b></td></tr>';
	    }
		//endforeach; ?> 
    </tbody>
</table><table width="90%" border="0" cellpadding="1" cellspacing="1" id="data" align="center">
  <tr>
    <td align="left" ><?php echo $paginator; ?></td>
    <td align="right" style="width:75%" ></td>
  </tr>
</table>
		  </div>
			</div>
			
		</div>
		<!-- end #content -->
		<?php $this->load->view('admin_views/sidebar_master'); ?><!-- end #sidebar -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	</div>
	<!-- end #page -->
	<div id="footer-bgcontent">
	<?php $this->load->view('admin_views/footer'); ?></div>
	<!-- end #footer -->

